home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / MSGLINC.PAK / GLU.H < prev   
C/C++ Source or Header  |  1997-05-06  |  11KB  |  265 lines

  1. /*++ BUILD Version: 0004    // Increment this if a change has global effects
  2.  
  3. Module Name:
  4.  
  5.     glu.h
  6.  
  7. Abstract:
  8.  
  9.     Procedure declarations, constant definitions and macros for the OpenGL
  10.     Utility Library.
  11.  
  12. --*/
  13.  
  14. /*
  15.  *      C/C++ Run Time Library - Version 8.0
  16.  *
  17.  *      Copyright (c) 1994, 1997 by Borland International
  18.  *      All Rights Reserved.
  19.  *
  20.  */
  21.  
  22. #ifndef __GLU_H__
  23. #define __GLU_H__
  24. #define __GLU_H
  25. #pragma option -b
  26.  
  27. /*
  28. ** Copyright 1991-1993, Silicon Graphics, Inc.
  29. ** All Rights Reserved.
  30. ** 
  31. ** This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  32. ** the contents of this file may not be disclosed to third parties, copied or
  33. ** duplicated in any form, in whole or in part, without the prior written
  34. ** permission of Silicon Graphics, Inc.
  35. ** 
  36. ** RESTRICTED RIGHTS LEGEND:
  37. ** Use, duplication or disclosure by the Government is subject to restrictions
  38. ** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  39. ** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  40. ** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  41. ** rights reserved under the Copyright Laws of the United States.
  42. */
  43.  
  44. #pragma option -b.
  45. #include <GL/gl.h>
  46. #pragma option -b
  47.  
  48. #ifdef __cplusplus
  49. extern "C" {
  50. #endif
  51.  
  52. /*
  53. ** Return the error string associated with a particular error code.
  54. ** This will return 0 for an invalid error code.
  55. **
  56. ** The generic function prototype that can be compiled for ANSI or Unicode
  57. ** is defined as follows:
  58. **
  59. ** LPCTSTR APIENTRY gluErrorStringWIN (GLenum errCode);
  60. */
  61. #ifdef UNICODE
  62. #define gluErrorStringWIN(errCode) ((LPCSTR)  gluErrorUnicodeStringEXT(errCode))
  63. #else
  64. #define gluErrorStringWIN(errCode) ((LPCWSTR) gluErrorString(errCode))
  65. #endif
  66. const GLubyte* APIENTRY gluErrorString (GLenum errCode);
  67. const wchar_t* APIENTRY gluErrorUnicodeStringEXT (GLenum errCode);
  68.  
  69. void APIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
  70. void APIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
  71. void APIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble width, GLdouble height, GLint viewport[4]);
  72. void APIENTRY gluLookAt (GLdouble eyex, GLdouble eyey, GLdouble eyez, GLdouble centerx, GLdouble centery, GLdouble centerz, GLdouble upx, GLdouble upy, GLdouble upz);
  73. int APIENTRY gluProject (GLdouble objx, GLdouble objy, GLdouble objz, const GLdouble modelMatrix[16], const GLdouble projMatrix[16], const GLint viewport[4], GLdouble *winx, GLdouble *winy, GLdouble *winz);
  74. int APIENTRY gluUnProject (GLdouble winx, GLdouble winy, GLdouble winz, const GLdouble modelMatrix[16], const GLdouble projMatrix[16], const GLint viewport[4], GLdouble *objx, GLdouble *objy, GLdouble *objz);
  75.  
  76. int APIENTRY gluScaleImage (GLenum format, GLint widthin, GLint heightin, GLenum typein, const void *datain, GLint widthout, GLint heightout, GLenum typeout, void *dataout);
  77.  
  78. int APIENTRY gluBuild1DMipmaps (GLenum target, GLint components, GLint width, GLenum format, GLenum type, const void *data);
  79. int APIENTRY gluBuild2DMipmaps (GLenum target, GLint components, GLint width, GLint height, GLenum format, GLenum type, const void *data);
  80.  
  81. typedef struct GLUquadricObj GLUquadricObj;
  82. GLUquadricObj* APIENTRY gluNewQuadric (void);
  83. void APIENTRY gluDeleteQuadric (GLUquadricObj *state);
  84. void APIENTRY gluQuadricNormals (GLUquadricObj *quadObject, GLenum normals);
  85. void APIENTRY gluQuadricTexture (GLUquadricObj *quadObject, GLboolean textureCoords);
  86. void APIENTRY gluQuadricOrientation (GLUquadricObj *quadObject, GLenum orientation);
  87. void APIENTRY gluQuadricDrawStyle (GLUquadricObj *quadObject, GLenum drawStyle);
  88. void APIENTRY gluCylinder (GLUquadricObj *qobj, GLdouble baseRadius, GLdouble topRadius, GLdouble height, GLint slices, GLint stacks);
  89. void APIENTRY gluDisk (GLUquadricObj *qobj, GLdouble innerRadius, GLdouble outerRadius, GLint slices, GLint loops);
  90. void APIENTRY gluPartialDisk (GLUquadricObj *qobj, GLdouble innerRadius, GLdouble outerRadius, GLint slices, GLint loops, GLdouble startAngle, GLdouble sweepAngle);
  91. void APIENTRY gluSphere (GLUquadricObj *qobj, GLdouble radius, GLint slices, GLint stacks);
  92. void APIENTRY gluQuadricCallback (GLUquadricObj *qobj, GLenum which, void (CALLBACK* fn)());
  93.  
  94. typedef struct GLUtriangulatorObj GLUtriangulatorObj;
  95. GLUtriangulatorObj* APIENTRY gluNewTess (void);
  96. void APIENTRY gluTessCallback (GLUtriangulatorObj *tobj, GLenum which, void (CALLBACK* fn)());
  97. void APIENTRY gluDeleteTess (GLUtriangulatorObj *tobj);
  98. void APIENTRY gluBeginPolygon (GLUtriangulatorObj *tobj);
  99. void APIENTRY gluEndPolygon (GLUtriangulatorObj *tobj);
  100. void APIENTRY gluNextContour (GLUtriangulatorObj *tobj, GLenum type);
  101. void APIENTRY gluTessVertex (GLUtriangulatorObj *tobj, GLdouble v[3], void *data);
  102.  
  103. #ifdef __cplusplus
  104.     class GLUnurbsObj;
  105. #else 
  106.     typedef struct GLUnurbsObj GLUnurbsObj;
  107. #endif
  108. GLUnurbsObj* APIENTRY gluNewNurbsRenderer (void);
  109. void APIENTRY gluDeleteNurbsRenderer (GLUnurbsObj *nobj);
  110. void APIENTRY gluBeginSurface (GLUnurbsObj *nobj);
  111. void APIENTRY gluBeginCurve (GLUnurbsObj *nobj);
  112. void APIENTRY gluEndCurve (GLUnurbsObj *nobj);
  113. void APIENTRY gluEndSurface (GLUnurbsObj *nobj);
  114. void APIENTRY gluBeginTrim (GLUnurbsObj *nobj);
  115. void APIENTRY gluEndTrim (GLUnurbsObj *nobj);
  116. void APIENTRY gluPwlCurve (GLUnurbsObj *nobj, GLint count, GLfloat *array, GLint stride, GLenum type);
  117. void APIENTRY gluNurbsCurve (GLUnurbsObj *nobj, GLint nknots, GLfloat *knot, GLint stride, GLfloat *ctlarray, GLint order, GLenum type);
  118. void APIENTRY gluNurbsSurface (GLUnurbsObj *nobj, GLint sknot_count, GLfloat *sknot, GLint tknot_count, GLfloat *tknot, GLint s_stride, GLint t_stride, GLfloat *ctlarray, GLint sorder, GLint torder, GLenum type);
  119. void APIENTRY gluLoadSamplingMatrices (GLUnurbsObj *nobj, const GLfloat modelMatrix[16], const GLfloat projMatrix[16], const GLint viewport[4]);
  120. void APIENTRY gluNurbsProperty (GLUnurbsObj *nobj, GLenum property, GLfloat value);
  121. void APIENTRY gluGetNurbsProperty (GLUnurbsObj *nobj, GLenum property, GLfloat *value);
  122. void APIENTRY gluNurbsCallback (GLUnurbsObj *nobj, GLenum which, void (CALLBACK* fn)());
  123.  
  124.  
  125. /****           Callback function prototypes    ****/
  126.  
  127. /* gluQuadricCallback */
  128. typedef void (CALLBACK* GLUquadricErrorProc) (GLenum);
  129.  
  130. /* gluTessCallback */
  131. typedef void (CALLBACK* GLUtessBeginProc)    (GLenum);
  132. typedef void (CALLBACK* GLUtessEdgeFlagProc) (GLboolean);
  133. typedef void (CALLBACK* GLUtessVertexProc)   (void *);
  134. typedef void (CALLBACK* GLUtessEndProc)      (void);
  135. typedef void (CALLBACK* GLUtessErrorProc)    (GLenum);
  136.  
  137. /* gluNurbsCallback */
  138. typedef void (CALLBACK* GLUnurbsErrorProc)   (GLenum);
  139.  
  140.  
  141. /****           Generic constants               ****/
  142.  
  143. /* Errors: (return value 0 = no error) */
  144. #define GLU_INVALID_ENUM        100900
  145. #define GLU_INVALID_VALUE       100901
  146. #define GLU_OUT_OF_MEMORY       100902
  147.  
  148. /* For laughs: */
  149. #define GLU_TRUE                GL_TRUE
  150. #define GLU_FALSE               GL_FALSE
  151.  
  152.  
  153. /****           Quadric constants               ****/
  154.  
  155. /* Types of normals: */
  156. #define GLU_SMOOTH              100000
  157. #define GLU_FLAT                100001
  158. #define GLU_NONE                100002
  159.  
  160. /* DrawStyle types: */
  161. #define GLU_POINT               100010
  162. #define GLU_LINE                100011
  163. #define GLU_FILL                100012
  164. #define GLU_SILHOUETTE          100013
  165.  
  166. /* Orientation types: */
  167. #define GLU_OUTSIDE             100020
  168. #define GLU_INSIDE              100021
  169.  
  170. /* Callback types: */
  171. /*      GLU_ERROR               100103 */
  172.  
  173.  
  174. /****           Tesselation constants           ****/
  175.  
  176. /* Callback types: */
  177. #define GLU_BEGIN               100100          /* void (*)(GLenum)     */
  178. #define GLU_VERTEX              100101          /* void (*)(void *)     */
  179. #define GLU_END                 100102          /* void (*)(void)       */
  180. #define GLU_ERROR               100103          /* void (*)(GLint)      */
  181. #define GLU_EDGE_FLAG           100104          /* void (*)(GLboolean)  */
  182.  
  183. /* Contours types: */
  184. #define GLU_CW                  100120
  185. #define GLU_CCW                 100121
  186. #define GLU_INTERIOR            100122
  187. #define GLU_EXTERIOR            100123
  188. #define GLU_UNKNOWN             100124
  189.  
  190. #define GLU_TESS_ERROR1         100151
  191. #define GLU_TESS_ERROR2         100152
  192. #define GLU_TESS_ERROR3         100153
  193. #define GLU_TESS_ERROR4         100154
  194. #define GLU_TESS_ERROR5         100155
  195. #define GLU_TESS_ERROR6         100156
  196. #define GLU_TESS_ERROR7         100157
  197. #define GLU_TESS_ERROR8         100158
  198.  
  199.  
  200. /****           NURBS constants                 ****/
  201.  
  202. /* Properties: */
  203. #define GLU_AUTO_LOAD_MATRIX    100200
  204. #define GLU_CULLING             100201
  205. #define GLU_SAMPLING_TOLERANCE  100203
  206. #define GLU_DISPLAY_MODE        100204
  207.  
  208. /* Trimming curve types */
  209. #define GLU_MAP1_TRIM_2         100210
  210. #define GLU_MAP1_TRIM_3         100211
  211.  
  212. /* Display modes: */
  213. /*      GLU_FILL                100012 */
  214. #define GLU_OUTLINE_POLYGON     100240
  215. #define GLU_OUTLINE_PATCH       100241
  216.  
  217. /* Callbacks: */
  218. /*      GLU_ERROR               100103 */
  219.  
  220. /* Errors: */
  221. #define GLU_NURBS_ERROR1        100251
  222. #define GLU_NURBS_ERROR2        100252
  223. #define GLU_NURBS_ERROR3        100253
  224. #define GLU_NURBS_ERROR4        100254
  225. #define GLU_NURBS_ERROR5        100255
  226. #define GLU_NURBS_ERROR6        100256
  227. #define GLU_NURBS_ERROR7        100257
  228. #define GLU_NURBS_ERROR8        100258
  229. #define GLU_NURBS_ERROR9        100259
  230. #define GLU_NURBS_ERROR10       100260
  231. #define GLU_NURBS_ERROR11       100261
  232. #define GLU_NURBS_ERROR12       100262
  233. #define GLU_NURBS_ERROR13       100263
  234. #define GLU_NURBS_ERROR14       100264
  235. #define GLU_NURBS_ERROR15       100265
  236. #define GLU_NURBS_ERROR16       100266
  237. #define GLU_NURBS_ERROR17       100267
  238. #define GLU_NURBS_ERROR18       100268
  239. #define GLU_NURBS_ERROR19       100269
  240. #define GLU_NURBS_ERROR20       100270
  241. #define GLU_NURBS_ERROR21       100271
  242. #define GLU_NURBS_ERROR22       100272
  243. #define GLU_NURBS_ERROR23       100273
  244. #define GLU_NURBS_ERROR24       100274
  245. #define GLU_NURBS_ERROR25       100275
  246. #define GLU_NURBS_ERROR26       100276
  247. #define GLU_NURBS_ERROR27       100277
  248. #define GLU_NURBS_ERROR28       100278
  249. #define GLU_NURBS_ERROR29       100279
  250. #define GLU_NURBS_ERROR30       100280
  251. #define GLU_NURBS_ERROR31       100281
  252. #define GLU_NURBS_ERROR32       100282
  253. #define GLU_NURBS_ERROR33       100283
  254. #define GLU_NURBS_ERROR34       100284
  255. #define GLU_NURBS_ERROR35       100285
  256. #define GLU_NURBS_ERROR36       100286
  257. #define GLU_NURBS_ERROR37       100287
  258.  
  259. #ifdef __cplusplus
  260. }
  261. #endif
  262.  
  263. #pragma option -b.
  264. #endif /* __GLU_H__ */
  265.